<div class="bpm-work">
  <div class="bpm-work-ex">
    <div class="bpm-work-ex-content">
      <div class="bpm-tabs">
        <h2 class="bpm-tabs-title">
          通知公告
        </h2>
        <div class="bpm-tabs-sub">
          <div class="bpm-tabs-sub-ioc"></div>
          <div class="bpm-tabs-sub-h2">基本信息</div>
        </div>
        <table *ngIf="fs.er.FIELD_ISNEW">
          <tr>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">标题</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control4" [nzValidateStatus]="bt.invalid?'error':'success'" nzHasFeedback>
                <input nz-input [(ngModel)]="fs.er.bt" name="bt" required #bt="ngModel" />
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">内容</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control4">
                <editor [init]="initTool" [(ngModel)]="fs.er.nr" name="nr"></editor>
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label1">附件</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control4">
                <nz-upload nzAction="{{ ffs.getUploadUrl() }}" [nzMultiple]="false" [nzShowUploadList]="true"
                  [nzShowButton]="true" [(nzFileList)]="fs.er.fj" name="fj" (nzChange)="ffs.handleChange($event)">
                  <button nz-button><i nz-icon type="upload"></i><span>上传</span></button>
                </nz-upload>
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label1">是否需求回执</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control">
                <nz-switch nzCheckedChildren="是" nzUnCheckedChildren="否" [(ngModel)]="fs.er.sfhz" name="valid">
                </nz-switch>
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label1">收件人<span *ngIf="fs.er.sjrid">({{fs.er.sjrid.length}}人)</span>
              </nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <app-userselect [(userNames)]='fs.er.sjrmc' [(userIDs)]='fs.er.sjrid'></app-userselect>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label1">备注</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control4">
                <input nz-input [(ngModel)]="fs.er.bz" name="bz" />
              </nz-form-control>
            </td>
          </tr>
        </table>

        <table *ngIf="!fs.er.FIELD_ISNEW">
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">标题</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control4">
                <label>{{fs.er.bt}}</label>
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">内容</nz-form-label>
            </td>
            <td class="form-input" colspan="3" height="200px">
              <nz-form-control class="form-control4">
                <pre [innerHTML]="fs.er.nr"></pre>
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label1">附件</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control4">
                <nz-upload nzAction="{{ ffs.getUploadUrl() }}" [nzMultiple]="false" [nzShowUploadList]="true"
                  [nzShowButton]="false" [(nzFileList)]="fs.er.fj" name="fj" (nzChange)="ffs.handleChange($event)">
                  <button nz-button><i nz-icon type="upload"></i><span>上传</span></button>
                </nz-upload>
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label1">是否需要回执</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control">
                <label>{{fs.er.sfhz | boolReform}}</label>
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label1">备注</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control">
                <label>{{fs.er.bz}}</label>
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">发起人</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control">
                {{fs.er.cjrmc}}
              </nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label class="form-label">发起时间</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control">
                {{fs.er.cjsj | date:'yyyy年MM月dd日 HH:mm:ss' }}
              </nz-form-control>
            </td>
          </tr>
        </table>

        <div class="bpm-tabs-sub" *ngIf="fs.er.sfhz && fs.er.hzzt!=='无需回执'">
          <div class="bpm-tabs-sub-ioc"></div>
          <div class="bpm-tabs-sub-h2">回执</div>
        </div>
        <table *ngIf="fs.er.sfhz && fs.er.hzzt!=='无需回执'">
          <tr>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">回执意见</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control4" [nzValidateStatus]="ydyj.invalid?'error':'success'"
                  nzHasFeedback>
                  <input nz-input [(ngModel)]="fs.er.hzyj" name="ydyj" required #ydyj="ngModel" />
                </nz-form-control>
            </td>
          </tr>
        </table>

        <div class="bpm-tabs-sub" *ngIf="fs.er.sfhz">
          <div class="bpm-tabs-sub-ioc"></div>
          <div class="bpm-tabs-sub-h2">阅读/回执情况</div>
        </div>
        <nz-table [nzData]="[{}]" [nzShowPagination]="false" *ngIf="fs.er.sfhz">
          <thead>
            <tr>
              <th width="30%">收件人</th>
              <th width="20%">是否已读</th>
              <th width="50%">回执意见</th>
            </tr>
          </thead>
          <tbody>
            <tr *ngFor="let cdata of cfs.datas">
              <td><span>{{cdata.jsrmc}}</span></td>
              <td><span>{{cdata.sfyd}}</span></td>
              <td><span>{{cdata.ydyj}}</span></td>
            </tr>
          </tbody>
        </nz-table>
      </div>
    </div>
  </div>
  <div class="content-loading" *ngIf="fs.isLoading || fs.isSaveing">
    <nz-spin [nzSize]="'large'"></nz-spin>
  </div>
</div>
<div class="bpm-foot">
  <div class="tools">
    <div class="item" (click)="save()" *ngIf="fs.er.FIELD_ISNEW">
      <i nz-icon type="save" class="icon"></i>
      <span class="text">发布</span>
    </div>
    <div class="item" (click)="receiver()" *ngIf="fs.er.sfhz && fs.er.hzzt!=='无需回执'">
      <i nz-icon type="save" class="icon"></i>
      <span class="text">回复</span>
    </div>
    <div class="item" (click)="close()">
      <i nz-icon type="logout" class="icon"></i>
      <span class="text">关闭</span>
    </div>
  </div>
</div>
